// 业务代码
var bcode = "test";

//fis.require('jello')(fis);

fis.match('::package', {
    //postpackager: fis.plugin('loader'),
    spriter: fis.plugin('csssprites'),
    postpackager: fis.plugin('loader', {
        allInOne: false
    })
});

// 项目忽略的文件
fis.set('project.ignore', [
    'fis-conf.js',
    'package.json',
    'src/**',
    'pom.xml',
    'README.md',
    'target/**'
]);

// 文件指纹
fis.match('*.{js,css,png}', {
    useHash: false,
    domain: ''
});

// 压缩资源
// 清除其他配置，只保留如下配置
fis.match('*.js', {
    // fis-optimizer-uglify-js 插件进行压缩，已内置
    optimizer: fis.plugin('uglify-js')
});

fis.match('*.css', {
    // fis-optimizer-clean-css 插件进行压缩，已内置
    optimizer: fis.plugin('clean-css')
});

fis.match('*.png', {
    // fis-optimizer-png-compressor 插件进行压缩，已内置
    optimizer: fis.plugin('png-compressor')
});

// CssSprite图片合并
fis.match('*.css', {
    useSprite: true
});

// 发布到web项目对应目录
fis.match('conf/(**).(*)', {
    release: '/WEB-INF/conf/$1',
    rExt: '.$2.sample'
});

fis.match('lib/*', {
    release: '/WEB-INF/$0'
});

fis.match('static/libs/*', {
    release: '/$0'
});

fis.match('static/css/(*)', {
    release: '/static/app/' + bcode + '/css/$1'
});

fis.match('static/js/(*)', {
    release: '/static/app/' + bcode + '/js/$1'
});

fis.match('static/img/(*)', {
    release: '/static/app/' + bcode + '/img/$1'
});

fis.match('static/html/(*)', {
    release: '/static/app/' + bcode + '/html/$1'
});

fis.match('static/design/(*)', {
    release: '/static/app/' + bcode + '/design/$1'
});

fis.match('static/template/(*)', {
    release: '/WEB-INF/views/$1'
});
// -End

fis.match('*', {
    deploy: fis.plugin('local-deliver', {
      to: '/Users/9dsoft/Project/biz-example-publish'
    })
});
